﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace Kokomo.IO
{
	[DebuggerDisplay("Base offset = {BaseOffset}, Offset = {Offset}, Length = {Length}")]
	public class StreamRegion
	{
		public long BaseOffset { get; private set; }
		public long Offset { get; private set; }
		public long Length { get; private set; }

		public StreamRegion(long baseOffset, long offset, long length)
		{
			this.BaseOffset = baseOffset;
			this.Offset = offset;
			this.Length = length;
		}

		public bool Contains(long offset)
		{
			return ((offset > this.Offset) && (offset < (this.Offset + this.Length)));
		}
	}
}
